const mongoose = require("mongoose");
const Schema = mongoose.Schema;

const attendanceSchema = new Schema({
    userId: {
        type: String,
        required: true
    },
    teacherId: {
        type: String,
        required: true
    },
    student_name: {
        type: String,
        required: true
    },
    teacher_name: {
        type: String,
        required: true
    },
    state: {
        type: String,
        required: true
    },
    // 签到时间
    attendanceTime: {
        type: Date,
        default: Date.now
    }
})

module.exports = {
    attendanceSchema: mongoose.model('attendanceSchema', attendanceSchema)
}